package priv.pront.code.mati.national.practice;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.StreamTokenizer;
import java.util.Scanner;

/**
 * @Author: Pronting
 * @Description:
 * @DateTime: 2023/12/1 15:29
 **/
public class P2004_领地选择 {

    static int n, m, c, x, y;
    static int max = Integer.MIN_VALUE;
    static int[][] a;
    static int[][] preSum;
    static StreamTokenizer st = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
    public static void main(String[] args) throws IOException {
        st.nextToken();
        n = (int) st.nval;
        st.nextToken();
        m = (int) st.nval;
        st.nextToken();
        c = (int) st.nval;

        a = new int[n][m];
        preSum = new int[n][m];
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                st.nextToken();
                a[i][j] = (int) st.nval;
            }
        }

        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                preSum[i][j] = a[i][j];
                if(j > 0) preSum[i][j] += preSum[i][j - 1];
                if(i > 0) preSum[i][j] += preSum[i - 1][j];
                if(j > 0 && i > 0) preSum[i][j] -= preSum[i - 1][j - 1];

            }
        }

        for (int i = c - 1 ; i < n; i++) {
            for (int j = c - 1; j < m; j++) {
                int value;
                if(i == c - 1 && j == c - 1){
                    value = preSum[i][j];
                }else if(i > c - 1 && j == c - 1){
                    value = preSum[i][j] - preSum[i - c][j];
                }else if(i == c - 1 && j > c - 1){
                    value = preSum[i][j] - preSum[i][j - c];
                }else{
                    value = preSum[i][j] - preSum[i - c][j] - preSum[i][j - c] + preSum[i - c][j - c];
                }
                if(value > max){
                    max = value;
                    x = i; y = j;
                }
            }
        }
        System.out.print(x - c + 2 + " ");
        System.out.print(y - c + 2);
    }
}
